﻿using Abp.Domain.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Toolbelt.ComponentModel.DataAnnotations.Schema;

namespace HCD.Entities
{
    [Table("PATIENT_PARTING_INFO")]
    public class PatientPartingInfo : Entity<long>
    {

        /// <summary>
        /// 病人标识
        /// </summary>
        [Column("PATIENT_ID", TypeName = "VARCHAR(20)"), Index("IXU_PATIENT_PARTING_INFO", 1, IsUnique = true)]
        public string PatientId { get; set; }

        /// <summary>
        /// 本次就诊标志
        /// </summary>
        [Column("VISIT_ID", TypeName = "VARCHAR(20)"), Index("IXU_PATIENT_PARTING_INFO", 2, IsUnique = true)]
        public string VisitId { get; set; }

        /// <summary>
        /// 科室代码
        /// </summary>
        [Column("DEPT_CODE", TypeName = "VARCHAR(40)")]
        public string DeptCode { get; set; }

        /// <summary>
        /// 患者所属分类
        /// </summary>
        [Column("PATIENT_TYPE", TypeName = "VARCHAR(100)")]
        public string PatientType { get; set; }

        /// <summary>
        /// 患者管理分型代码
        /// </summary>
        [Column("PARTING_CODE", TypeName = "VARCHAR(45)")]
        public string PartingCode { get; set; }

        /// <summary>
        /// 空腹/餐前最低值
        /// </summary>
        [Column("BEFORE_MEAL_MIN", TypeName = "DECIMAL")]
        public decimal BeforeMealMin { get; set; }

        /// <summary>
        /// 空腹/餐前最高值
        /// </summary>
        [Column("BEFORE_MEAL_MAX", TypeName = "DECIMAL")]
        public decimal BeforeMealMax { get; set; }

        /// <summary>
        /// 餐后2h/随机最低值
        /// </summary>
        [Column("AFTER_MEAL_2H_MIN", TypeName = "DECIMAL")]
        public decimal AfterMeal2hMin { get; set; }

        /// <summary>
        /// 餐后2h/随机最高值
        /// </summary>
        [Column("AFTER_MEAL_2H_MAX", TypeName = "DECIMAL")]
        public decimal AfterMeal2hMax { get; set; }

        /// <summary>
        /// 低血糖危急值
        /// </summary>
        [Column("HYPOGLYCEMIA_CRITICAL", TypeName = "DECIMAL")]
        public decimal HypoglycemiaCritical { get; set; }

        /// <summary>
        /// 高血糖危急值
        /// </summary>
        [Column("HYPERGLYCEMIA_CRITICAL", TypeName = "DECIMAL")]
        public decimal HyperglycemiaCritical { get; set; }
    }
}
